﻿namespace Sidvall.LogManager.Data.ConfigModel
{
    public abstract partial class EntityFacadeBase : global::Sidvall.LogManager.Data.ConfigModel.IEntityFacadeManager
    {
        #region Public Members

        #region ResourceFactory

        private global::Sidvall.Data.IResourceFactory _ResourceFactory;
        public global::Sidvall.Data.IResourceFactory ResourceFactory
        {
            get
            {
                if (_EntityFacadeManager != null)
                    return _EntityFacadeManager.ResourceFactory;
                return _ResourceFactory;
            }
            private set
            {
                _ResourceFactory = value;
            }
        }

        #endregion
        #region GenericEntityFacade

        private global::Sidvall.LogManager.Data.ConfigModel.GenericEntityFacade _GenericEntityFacade;
        public global::Sidvall.LogManager.Data.ConfigModel.GenericEntityFacade GenericEntityFacade
        {
            get
            {
                if (_EntityFacadeManager != null)
                    return _EntityFacadeManager.GenericEntityFacade;
                return _GenericEntityFacade;
            }
            private set
            {
                _GenericEntityFacade = value;
            }
        }

        #endregion

        #endregion
        #region Private Members

        private global::Sidvall.LogManager.Data.ConfigModel.IEntityFacadeManager _EntityFacadeManager;

        #endregion
        #region Constructors

        protected EntityFacadeBase(global::Sidvall.Data.IResourceFactory resourceFactory)
        {
            this.ResourceFactory = resourceFactory;
            this.GenericEntityFacade = new global::Sidvall.LogManager.Data.ConfigModel.GenericEntityFacade(this);
        }
        protected EntityFacadeBase(global::Sidvall.LogManager.Data.ConfigModel.IEntityFacadeManager entityFacadeManager)
        {
            _EntityFacadeManager = entityFacadeManager;
        }

        #endregion
    }
}